import thunk from "redux-thunk";

const fetchReduser = (state={},action={})=>{
    const {type,payload} = action;
    switch(type){
        case "FETCH_DATA_START":
            return Object.assign({},state,{status:'数据请求中...'});
        case "FETCH_DATA_FINISH":
            return Object.assign({},state,{status:'数据请求完成',list:payload});
        default:
            return state;
    }
}
export default fetchReduser;